<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue 过渡学习</title>
    <script src="js/vue.js"></script>
    <style>
        .fade-enter-active, .fade-leave-active {
            transition: opacity .5s
        }
        .fade-enter, .fade-leave-to {
            opacity: 0
        }
    </style>
</head>
<body>
    <div id="app">

        <div id="demo">
            <button v-on:click="show = !show">
                Toggle
            </button>
            <transition name="fade">
                <p v-if="show">hello</p>
            </transition>
        </div>

    </div>
</body>
<script>
    new Vue({
        el:'#app',
        data:{
            show:true
        }
    });
</script>
</html>